Generic Immutability and Nullity Types for an imperative object-oriented programming language with flexible initialization

نویسنده

  • James Elford
چکیده

We present a type system for parametric object mutability and reference nullity in an imperative object oriented language. We present a simple but powerful system for generic nullity constraints, and build on previous work to provide safe initialization of objects which is not bound to constructors. The system is expressive enough to handle initialization of cyclic immutable data structures, and to enforce their cyclic nature through the type system. We provide the crucial parts of soundness arguments (though the full proof is not yet complete). Our arguments are novel, in that they do not require auxiliary runtime constructs (ghost state) in order to express or demonstrate our desired properties.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards Unifying Immutability and Ownership

Immutability is a highly requested feature missing from the mainstream object-oriented languages. Boyland [2] argues that immutability cannot be introduced into a language without additional aliasing-prone mechanisms such as ownership (or fractional permissions). Rather than providing support for both of these important features independently [8, 6, 1], we explore the possibility of unifying th...

متن کامل

Type-Based Object Immutability with Flexible Initialization

We present a type system for checking object immutability, read-only references, and class immutability in an open or closed world. To allow object initialization outside object constructors (which is often needed in practice), im ­ mutable objects are initialized in lexically scoped regions. The system is simple and direct; its only type qualifiers specify immutability properties. No auxiliary...

متن کامل

Immutability

One of the main reasons aliasing has to be controlled, as highlighted in another chapter [1] of this book [2], is the possibility that a variable can unexpectedly change its value without the referrer’s knowledge. This book will not be complete without a discussion of the impact of immutability on referenceabundant imperative object-oriented languages. In this chapter we briefly survey possible...

متن کامل

Immutability: An Empirical Study in Scala

Utilizing immutability is considered to have many desired benefits when it comes to software development and reasoning about programs. It is also one of the core principles of functional programming, and many programming languages have support for specifying immutability. Developers can by specifying immutability write code that, for example, prevent program state from being unintentionally mut...

متن کامل

Recency Types for Analyzing Scripting Languages

With the current surge of scripting technologies, large programs are being built with dynamically typed languages. As these programs grow in size, semantics-based tools gain importance for detecting programming errors as well as for program understanding. As a basis for such tools, we propose a descriptive type system for an imperative call-by-value lambda calculus with objects. The calculus mo...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012